You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds regression coverage for swc compile --watch --out-file, matching the Windows scenario reported in #10524.
The new CLI test starts watch mode with a single output file, waits for the initial output, rewrites the input file, and asserts that the rebuilt output:
drops stale content from the first build
contains only one console.log
is overwritten instead of appended/prepended
This locks in the current rebuild behavior for single-file watch output.
This also bumps two Cargo.lock entries to clear current cargo-deny advisories reported by CI:
anyhow from 1.0.100 to 1.0.103
crossbeam-epoch from 0.9.18 to 0.9.20
Verified with:
cargo test -p swc_cli_impl issue_10524_watch_out_file_overwrites_rebuilt_output -- --nocapture
cargo-deny 0.18.9 check
manual Windows watch repro using target/debug/swc.exe compile src/app/v1/simple.js --out-file public/v1/output.js --watch; after rewriting the input, output.js contained only console.log("Hello, world 2!!");
cargo fmt --all --check failed before formatting with os error 206 (path too long)
cargo test -p swc_cli_impl -- --nocapture ran the new test successfully, but the full suite has existing Windows failures unrelated to this change, including issue_8265_1/issue_8667_1 using unavailable ls, plus existing path/root-mode/watch-dir failures
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Adds regression coverage for
swc compile --watch --out-file, matching the Windows scenario reported in #10524.The new CLI test starts watch mode with a single output file, waits for the initial output, rewrites the input file, and asserts that the rebuilt output:
console.logThis locks in the current rebuild behavior for single-file watch output.
This also bumps two
Cargo.lockentries to clear currentcargo-denyadvisories reported by CI:anyhowfrom1.0.100to1.0.103crossbeam-epochfrom0.9.18to0.9.20Verified with:
cargo test -p swc_cli_impl issue_10524_watch_out_file_overwrites_rebuilt_output -- --nocapturecargo-deny 0.18.9 checktarget/debug/swc.exe compile src/app/v1/simple.js --out-file public/v1/output.js --watch; after rewriting the input,output.jscontained onlyconsole.log("Hello, world 2!!");cargo fmt -p swc_cli_impl --checkcargo clippy -p swc_cli_impl --tests -- -D warningsI also tried broader local checks on Windows:
cargo fmt --all --checkfailed before formatting withos error 206(path too long)cargo test -p swc_cli_impl -- --nocaptureran the new test successfully, but the full suite has existing Windows failures unrelated to this change, includingissue_8265_1/issue_8667_1using unavailablels, plus existing path/root-mode/watch-dir failuresBREAKING CHANGE:
None.
Related issue (if exists):
Closes #10524